package com.yuexun.dhdoctor.module.healthRecord.model.impl;

import com.yuexun.dhdoctor.base.BaseEntity;
import com.yuexun.dhdoctor.module.healthRecord.api.HealthRecordApi;
import com.yuexun.dhdoctor.module.healthRecord.bean.HealthRcordBean;
import com.yuexun.dhdoctor.module.healthRecord.model.IHealthRecordModel;
import com.yuexun.dhdoctor.util.ApiUtil;

import java.util.Map;

import rx.Observable;

/**
 * Created by Administrator on 2018/12/4 0004.
 */

public class HealthRecordModel implements IHealthRecordModel{
    private HealthRecordApi api;

    public HealthRecordApi ApiInstance() {
        if (api != null) {
            return api;
        } else {
            return ApiUtil.getInstance().createRetrofitApi(HealthRecordApi.class);
        }
    }

    @Override
    public Observable<BaseEntity<HealthRcordBean>> inquirePatientInfoByRuiRuan(Map<String, String> praise) {
        api = ApiInstance();
        return api.inquirePatientInfoByRuiRuan(praise);
    }
}
